<script setup lang="tsx">
import { PropType } from 'vue'
import { CurdData } from '@/api/customerContcat/types'
import { Descriptions } from '@/components/Descriptions'
import useSchema from './hooks/useSchema'
import { useCrudSchemas } from '@/hooks/web/useCrudSchemas'

defineProps({
  currentRow: {
    type: Object as PropType<Nullable<CurdData>>,
    default: () => null
  }
})

const { crudSchemas } = useSchema()
const { allSchemas } = useCrudSchemas(crudSchemas)
</script>

<template>
  <Descriptions :schema="allSchemas.detailSchema" :data="currentRow || {}" />
</template>
